/**
 * @description dropdown
 */
const state = () => ({
  modal: false, //弹框
  pullDownModal: false,
  pullDownItem: 0,
})
const getters = {
  getModal: (state) => state.modal,
  getPullDownModal: (state) => state.pullDownModal,
  getPullDownItem: (state) => state.pullDownItem,
}
const mutations = {
  modalSwitch(state) {
    state.modal = !state.modal
  },
  pullDownModalSwitch(state) {
    state.pullDownModal = !state.pullDownModal
  },
  pullDownItem(state, item) {
    state.pullDownItem = item
  },
}
const actions = {
  modalSwitch({ commit }) {
    commit('modalSwitch')
  },
  pullDownModalSwitch({ commit }) {
    commit('pullDownModalSwitch')
  },
  pullDownItem({ commit }, item) {
    commit('pullDownItem', item)
  },
}
export default { state, getters, mutations, actions }
